<?php echo $this->fetch('header.html'); ?>
<div class="row">
<div class="span12">
<?php echo $this->fetch('coupon/nav.html'); ?>
 <table class='table table-bordered' width='100%'>
  <tr>
   <td>id</td>
   <td>名称</td>
   <td>类型</td>
   <td>价格</td>
   <td>最低消费</td>
   <td>数量</td>
   <td>截止日期</td>
   <td>创建时间</td>
   <td>状态</td>
<td>操作</td>
  </tr>
 <?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
   <td><?php echo $this->_var['c']['id']; ?></td>
   <td><?php echo $this->_var['c']['title']; ?></td>
   <td><?php echo $this->_var['type_list'][$this->_var['c']['type_id']]; ?></td>
   <td><?php echo $this->_var['c']['money']; ?></td>
   <td><?php echo $this->_var['c']['lower_money']; ?></td>
   <td><?php echo $this->_var['c']['amount']; ?></td>
   <td><?php echo date("Y-m-d",$this->_var['c']['end_time']); ?></td>
   <td><?php echo date("Y-m-d",$this->_var['c']['dateline']); ?></td>
   <td>
   		 <?php if ($this->_var['c']['status'] == 1): ?>
           <img src="/static/images/yes.gif" class="ajax_no"  rurl="<?php echo $this->_var['appadmin']; ?>?m=coupon&a=status&id=<?php echo $this->_var['c']['id']; ?>&status=1" url="<?php echo $this->_var['appadmin']; ?>?m=coupon&a=status&id=<?php echo $this->_var['c']['id']; ?>&status=0" />
           <?php else: ?>
           <img src="/static/images/no.gif"  class="ajax_yes" url="<?php echo $this->_var['appadmin']; ?>?m=coupon&a=status&id=<?php echo $this->_var['c']['id']; ?>&status=1" rurl="<?php echo $this->_var['appadmin']; ?>?m=coupon&a=status&id=<?php echo $this->_var['c']['id']; ?>&status=0" />  
          <?php endif; ?>
   </td>
<td><a href="/admin.php?m=coupon&a=add&id=<?php echo $this->_var['c']['id']; ?>">编辑</a> <a href="/admin.php?m=coupon&a=show&id=<?php echo $this->_var['c']['id']; ?>">查看</a> <a href="javascript:;" class="delete" url="/admin.php?m=coupon&a=delete&id=<?php echo $this->_var['c']['id']; ?>">删除</a></td>
  </tr>
   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
 </table>
<div><?php echo $this->_var['pagelist']; ?></div>
</div>
</div>
<?php echo $this->fetch('footer.html'); ?>